<template>
  <div v-if="status">
    <msg title="绑定手机号成功！" description="由于微信限制，底部菜单需要等待5分钟才会更新！<br\>若需要快速保修请进入个人中心保修!" :buttons="buttons" icon="success"></msg>
  </div>
</template>

<script>
  import {Msg} from "vux";
  export default {
    name: "BindSuccess",
    components: {
      Msg
    },
    data() {
      return {
        status: false,
        buttons: [
          {
            type: "primary",
            text: "个人中心",
            onClick: this.toCentral
          },
          {
            type: "default",
            text: "关闭网页",
            onClick: this.$wechat.closeWindow
          }
        ]
      }
    },
    mounted() {
      this.$getUserInfo().then(info => {
        this.status = true;
        this.$register(["closeWindow"])
      })
    },
    methods: {
      toCentral() {
        // 到个人中心
        this.$router.push("/common/todo")
      }
    }

  }
</script>

<style scoped>

</style>
